package com.north.light.androidutils.recyclerview.scrollview;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.PagerSnapHelper;
import androidx.recyclerview.widget.RecyclerView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.request.target.CustomTarget;
import com.bumptech.glide.request.transition.Transition;
import com.north.light.androidutils.R;
import com.north.light.androidutils.recyclerview.scrollview.test.BannerPicInfo;
import com.north.light.androidutils.recyclerview.scrollview.test.BannerPicLoadListener;
import com.north.light.androidutils.recyclerview.scrollview.test.BannerPicSizeCallback;
import com.north.light.androidutils.recyclerview.scrollview.test.BannerPicView;

import org.jetbrains.annotations.NotNull;

import java.util.ArrayList;
import java.util.List;


/**
 * @Author: lzt
 * @CreateDate: 2021/7/30 10:30
 * @Version: 1.0
 * @Description:用于CoordinatorLayout，为了填充默认数据list的recyclerview
 */
public class ScrollStringRecyclerView extends RecyclerView {


    public ScrollStringRecyclerView(@NonNull @NotNull Context context, @Nullable @org.jetbrains.annotations.Nullable AttributeSet attrs) {
        super(context, attrs);
        setLayoutManager(new LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false));
        new PagerSnapHelper().attachToRecyclerView(this);
    }

    /**
     * 设置数据
     */
    public void initData() {
        CoorAdapter adapter = new CoorAdapter();
        List<String> da = new ArrayList<>();
        for (int i = 0; i < 20; i++) {
            if (i % 2 == 0) {
                da.add("asdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManagerasdfafaLinearLayoutManager");
            } else {
                da.add(i + "asdfasdfsadfsadf");
            }
        }
        adapter.mData = da;
        this.setAdapter(adapter);
        adapter.notifyDataSetChanged();
    }

    public static class CoorAdapter extends Adapter<CoorAdapter.CoorVH> {
        private List<String> mData = new ArrayList<>();

        @NotNull
        @Override
        public CoorVH onCreateViewHolder(@NonNull @NotNull ViewGroup parent, int viewType) {
            return new CoorVH(LayoutInflater.from(parent.getContext()).inflate(
                    R.layout.activity_scroll_adapter_item,
                    parent, false));
        }

        @Override
        public void onBindViewHolder(@NonNull @NotNull CoorVH holder, int position) {
            String data = mData.get(position);
            holder.mContent.setText(data);


            List<BannerPicInfo> bannerPicInfo = new ArrayList<>();
            String netPath = "https://img-blog.csdnimg.cn/4a1c8119a86942598cafbe7d93c08647.png?x-oss-process=image/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBAREzkuLblk4jmoLnovr7mlq8=,size_20,color_FFFFFF,t_70,g_se,x_16";
            String netPath2 = "https://img-blog.csdnimg.cn/07fa99fd7ad945689f470aa4cf21b2ec.png?x-oss-process=image/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBAREzkuLblk4jmoLnovr7mlq8=,size_12,color_FFFFFF,t_70,g_se,x_16";
            for (int i = 0; i < 10; i++) {
                BannerPicInfo cache = new BannerPicInfo();
                cache.setPicUrl(netPath);
                if (i % 2 == 1) {
                    cache.setPicUrl(netPath);
                } else {
                    cache.setPicUrl(netPath2);
                }
                bannerPicInfo.add(cache);
            }
            holder.mBannerPicView.setDataPositionListener(new BannerPicView.DataPositionListener() {
                @Override
                public void pos(int curPos, int total) {
                    Log.d("PicBannerActivity", "---pos---: " + curPos + " total: " + total);
                }

                @Override
                public void empty() {
                    Log.d("PicBannerActivity", "---empty---");
                }
            });
            holder.mBannerPicView.setData(bannerPicInfo, new BannerPicLoadListener() {
                @Override
                public void load(ImageView img, String url, BannerPicSizeCallback picSizeCallback) {
                    Glide.with(img.getContext())
                            .asBitmap()
                            .load(url)
                            .into(new CustomTarget<Bitmap>() {
                                @Override
                                public void onResourceReady(@NonNull Bitmap resource, @Nullable Transition<? super Bitmap> transition) {
                                    if (picSizeCallback != null) {
                                        picSizeCallback.size(url, resource.getWidth(), resource.getHeight(), resource);
                                    }
                                }

                                @Override
                                public void onLoadCleared(@Nullable Drawable placeholder) {

                                }
                            });
                }
            });
//            holder.mBannerPicView.canAutoScroll(true);
        }

        @Override
        public int getItemCount() {
            return mData.size();
        }

        public static class CoorVH extends ViewHolder {
            private TextView mContent;
            private BannerPicView mBannerPicView;

            public CoorVH(@NonNull @NotNull View itemView) {
                super(itemView);
                mContent = itemView.findViewById(R.id.activity_coor_adapter_item_txt);
                mBannerPicView = itemView.findViewById(R.id.mBannerPicView);
            }
        }
    }
}
